<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="csrf-param" content="_csrf">
    <meta name="csrf-token"
          content="pxgjUPgWVWHGlAaqe7moZRter2qFD4S0GFhrZXIYj33FL00xrEEKD6jHRP0Z_v40UQjZA8JsvdtiMF4CJFrHHw==">
    <title>统计数据 - 首页</title>
    <link rel="stylesheet" href="{{ asset('admin-assets/css/bootstrap.min.css') }}"/>
    <style>
        div.main {
            margin-top: 55px;
            padding: 15px 8px;
        }

        nav.navbar {
            background: #0C0C0C;
        }

        .navbar-default .navbar-brand, div#nav li.active a, .navbar-default .navbar-nav > li > a {
            color: white;
        }

        .navbar-header > a.navbar-brand {
            padding: 15px;
            display: inline-block;
            margin-left: 0 !important;
            font-size: 14px;
        }

        div.navbar-header div.dropdown a:hover,
        .navbar-header > a.active,
        .navbar-header > a.navbar-brand:hover,
        .navbar-default .navbar-nav > .active > a,
        .navbar-default .navbar-nav > .active > a:focus,
        .navbar-default .navbar-nav > .active > a:hover,
        .navbar-default .navbar-nav > li > a:hover {
            color: white;
            background: #656565;
        }

        div.navbar-header div.dropdown {
            display: inline-block;
            float: right;
            padding: 15px;
        }

        div.navbar-header div.dropdown ul {
            background: #0C0C0C;
        }

        div.navbar-header div.dropdown a {
            color: white;
        }

        a.dropdown-toggle {
            font-size: 14px;
        }
    </style>
    @stack('css')
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            @if(session('user.type') == 1)
                <button type="button"
                        class="navbar-toggle collapsed"
                        data-toggle="collapse"
                        data-target="#navbar"
                        aria-expanded="false"
                        aria-controls="navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
            @endif
            <a class="navbar-brand @if(request()->is('statistical/index/index')) active @endif"
               href="{{ url('statistical/index/index') }}">
                首页
            </a>
            <a class="navbar-brand @if(request()->is('statistical/index/setting')) active @endif"
               href="{{ url('statistical/index/setting') }}">
                设置
            </a>

            <div class="dropdown pull-right" href="#">
                <a href="#"
                   class="dropdown-toggle"
                   data-toggle="dropdown"
                   role="button"
                   aria-haspopup="true"
                   aria-expanded="false">
                    {{ session('user.username') }}
                    <span class="caret"></span>
                </a>
                <ul class="dropdown-menu">
                    <li>
                        <a href="{{ url('statistical/index/logout') }}">退出登录</a>
                    </li>
                </ul>
            </div>
        </div>
        @if(session('user.type') == 1)
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav pull-left">
                    <li @if(request()->is('statistical/user/upload')) class="active" @endif>
                        <a href="{{ url('statistical/user/upload') }}">
                            上传数据
                        </a>
                    </li>
                    <li @if(request()->is('statistical/user/create')) class="active" @endif>
                        <a href="{{ url('statistical/user/create') }}">
                            添加子账号
                        </a>
                    </li>
                </ul>
            </div>
        @endif
    </div>
</nav>
<div class="main container" id="content" role="main">
    @yield('content')
</div> <!-- /container -->
<script src="{{ asset('admin-assets/plugins/jQuery/jQuery-2.1.4.min.js') }}"></script>
<script src="{{ asset('admin-assets/js/bootstrap.min.js') }}"></script>
@stack('javascript')
</body>
</html>
